home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15061 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: nntp.teleport.com!usenet
  2. From: GHouck <hksys@teleport.com>
  3. Newsgroups: comp.lang.c++,comp.lang.c
  4. Subject: Re: compiling problem under g++
  5. Date: 3 Apr 1996 12:54:14 GMT
  6. Organization: systems hk
  7. Message-ID: <4jtsdm$hba@nadine.teleport.com>
  8. References: <3161A2D3.7D84@psu.edu>
  9. NNTP-Posting-Host: ip-pdx01-07.teleport.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
  14.  
  15. "Jason A. Soloff" <jas251@psu.edu> wrote:
  16. >Minor problem here... I have been coding in C++ for years on the Dos/win 
  17. >platforms, and am running into (what has to be) a simple, but annoying 
  18. >problem...
  19. >
  20. >#include <math.h>
  21. >int main(void)
  22. >{
  23. >  printf("%f\n",sqrt(25));
  24. >  return 0;
  25. >}
  26. >
  27. >OK... thats it... nice and simple huh?  Nope.
  28. >Won't compile on two unix systems I am trying to work with...
  29. >SunOS 4.1.3_U1, with g++ 2.4  It can't seem to find the
  30. >sqrt code from the library?  Am I missing something?  is the
  31. >library called something else under UNIX?
  32.  
  33. Jason,
  34.  
  35. If the '25' is truly an integer, perhaps that is the
  36. problem, since there probably is no function available
  37. to take the square root of an integer, but rather
  38. a double.  Unless, of course, it casts it, then ...
  39.  
  40. Yours, Geoff Houck
  41.  
  42.  
  43.  
  44.  
  45.